{{extend 'layout.html'}}

<h1>System Pages</h1>

<h2>Create New page</h2>

{{=form}}

<h2>Current Pages</h2>

<table>
  {{for page in pages:}}
  <tr>
    <td>{{=A(page.slug,_href=URL(r=request,f='page',args=page.slug))}}</td>
    <td><i>{{=page.title}}</i></td>
    <td>{{=page.created_on}}</td>
    <td>{{=page.public and 'public' or 'private'}} {{=page.role}}</td>
    <td>{{=page.active and 'active' or 'inactive'}}</td>
    <td>[{{=A('edit',_href=URL(r=request,f='page_edit',args=page.slug))}}]</td>
  </tr>
  {{pass}}
</table>

<h3>Info</h3>

Pages started with undescore are considered system pages. In particular:
<ul>
  <li><a href="{{=URL(r=request,f='page',args='meta-code')}}">meta-code</a> must contain code and it will be executed for every page.</li>
  <li><a href="{{=URL(r=request,f='page',args='meta-menu')}}">meta-menu</a> must contain a description of the menu.</li>
  <li><a href="{{=URL(r=request,f='page',args='meta-header')}}">meta-header</a> conatins the content of the header.</li>
  <li><a href="{{=URL(r=request,f='page',args='meta-sidebar')}}">meta-sidebar</a> conatins the content of the sidebar.</li>
  <li><a href="{{=URL(r=request,f='page',args='meta-footer')}}">meta-footer</a> conatins the content of the footer.</li>
</ul>
